//正例
export declare function x(a: number | string): void;
export declare function y(...a: readonly number[]): void;

declare class Example {
  privateMethod(a: number): void;
  #privateMethod(a: number, b?: string): void;
}

interface I {
  a2(): void;
  a2(x: number, y: number): void;
}

interface I {
  a4(): void;
  a4(x: number): number;
}

interface I {
  a5<T>(x: T): T;
  a5(x: number): number;
}

//正例
interface I {
  b2(x: string): void;
  b2(...x: number[]): void;
}

interface I {
  b3(...x: number[]): void;
  b3(...x: string[]): void;
}

interface I {
  c3(x: number): void;
  c3(x?: string): void;
}

interface I {
  d2(x: string, y: number): void;
  d2(x: number, y: string): void;
}

//正例
declare class D {
  static a();
  a(x: number);
}

interface Generic<T> {
  x(): void;
  x(x: T[]): void;
}

declare function foo(n: number): number;
declare module 'hello' {
  function foo(n: number, s: string): number;
}

{
  function block(): number;
  function block(n: number): number;
  function block(n?: number): number {
    return 3;
  }
}

//正例
export interface Foo {
  bar(baz: string): number[];
  bar(): string[];
}

declare class Foo {
  get bar();
  set bar(x: number);
}

interface Foo {
  get bar();
  set bar(x: number);
}

abstract class Foo {
  abstract get bar();
  abstract set bar(a: unknown);
}


